<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    *{
      margin: 0;
      padding: 0;
      list-style: none;
    }
    html,body{
      background-color: #ccc;
    }
    .box{
      width: 400px;
      margin: 10px 80px;
    }
    h1{
      font-family: "Arial", serif;
      font-size: 26px;
    }
    ul{
      width: 100%;
      margin-top: 20px;
      margin-left: 5px;
    }
    ul li{
      width: 25%;
      float: left;
    }
    li img{
      width: 90%;
    }
    .show{
      width: 100%;
    }
    .show img{
      width: 100%;
    }
  </style>
</head>
<body>
  <div class="box">
    <h1>美女画廊</h1>
    <ul>
      <li><a href="images/1.jpg"><img src="images/1-small.jpg" alt="美女A"></a></li>
      <li><a href="images/2.jpg"><img src="images/2-small.jpg" alt="美女B"></a></li>
      <li><a href="images/3.jpg"><img src="images/3-small.jpg" alt="美女C"></a></li>
      <li><a href="images/4.jpg"><img src="images/4-small.jpg" alt="美女D"></a></li>
    </ul>
    <div class="show"><img src="images/placeholder.png" alt=""></div>
    <span>选择一个图片</span>
  </div>
  <script src="../../jquery-1.12.4.min.js"></script>
  <script>
    $('a').click(function(){
      $('.show>img').prop('src',$(this).prop('href'));
      $('span').text($(this).children().prop('alt'));
      return false;
    })
  </script>
</body>
</html>